package com.storlead.sjwt.constants;

/**
 * @Author: Timo
 * @Date: 2019/3/21 10:38
 * @Description: 类用途：
 */

import lombok.Getter;

/**
 * 返回状态码及状态信息说明枚举
 *
 * @author blank
 * @since 2018/5/22 下午5:34
 */
@Getter
public enum ResultCode {
    /**
     * 成功
     */
    RESULT_SUCCESS(1, "处理成功", true),
    /**
     * 失败
     */
    RESULT_FAILED(0, "处理失败", false),
    /**
     * token不能为空
     */
    TOKEN_IS_NULL(100000, "token不能为空"),
    /**
     * 用户未登陆
     */
    USER_NOT_LOGIN(100001, "用户未登录"),
    /**
     * 缺少必传参数
     */
    PARAM_IS_NEEDED(100006, "缺少必传参数")
    ;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }



    ResultCode(int code, String msg, Boolean isSuccess) {
        this.code = code;
        this.msg = msg;
        this.isSuccess = isSuccess;
    }

    public int code;
    public String msg;
    public Boolean isSuccess = false;
}
